package com.axzhengxin.platform.business.controller;

import com.axzhengxin.platform.business.domain.BizApproveDetail;
import com.axzhengxin.platform.business.service.IBizApproveDetailService;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author AHZJ0005
 * @Date 2021/3/3-10:07
 **/
@RestController
@RequestMapping("/business/bizApproveDetail")
public class BizApproveDetailController {

    @Autowired
    private IBizApproveDetailService bizApproveDetailService;

    /**
     * 获取综合授信列表
     * @return
     */
    @RequestMapping("/bizApproveDetailList")
    public List<BizApproveDetail> bizApproveDetailList(String approveId){

        return bizApproveDetailService.bizApproveDetailList(approveId);
    }

    /**
     * 删除
     * @return 结果
     */
    @RequestMapping("/deleteApproveDetail")
    public AjaxResult deleteApproveDetail(String approveDetailId){

        return AjaxResult.success(bizApproveDetailService.deleteById(approveDetailId));
    }

    /**
     * 新增综合授信
     * @return 结果
     */
    @RequestMapping("/insertApproveDetail")
    public AjaxResult insertApproveDetail(BizApproveDetail bizApproveDetail){

        return bizApproveDetailService.insertApproveDetail(bizApproveDetail);
    }

}
